package com.frejoys.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.frejoys.dao.entity.UserWallet;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.math.BigDecimal;

public interface UserWalletMapper extends BaseMapper<UserWallet> {

//    @InterceptorIgnore(dataPermission = "false")
//    @Select("select * from user")
//    List<User> getList();

    @Update("update j_user_wallet set spend_money=spend_money+#{spendMoney} where user_id=#{userId}")
    boolean upSpendMoney(@Param("userId") Long userId, @Param("spendMoney") BigDecimal spendMoney);

}
